package com.simtop.service.impl;

import com.simtop.dao.SwlaneMapper;
import com.simtop.service.SwlaneService;
import com.simtop.vo.Swlane;
import com.simtop.vo.Swrelationlane;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Service
@Transactional
public class SwlaneServiceImpl implements SwlaneService {
    @Autowired
    private SwlaneMapper mapper;
    @Override
    public List<Swlane> findall() {
        return mapper.findall();
    }

    @Override
    public Integer savestate(Integer swlanestate, Integer id) {
        return mapper.savestate(swlanestate,id);
    }

    @Override
    public Integer savename(Integer id, String swlane) {
        return mapper.savename(id, swlane);
    }

    @Override
    public Integer deletelane(Integer id) {
        return mapper.deletelane(id);
    }

    @Override
    public Integer insertlane(String swlane) {
        return mapper.insertlane(swlane);
    }

    @Override
    public Integer deleterelation(Integer deviceid) {
        return mapper.deleterelation(deviceid);
    }

    @Override
    public List<Swrelationlane> findlane(Integer deviceid) {
        return mapper.findlane(deviceid);
    }

    @Override
    public Integer insertrelation(Integer deviceid, Integer laneid) {
        return mapper.insertrelation(deviceid,laneid);
    }
}
